<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试嵌套选择器</title>
    <style>
        p {color: #0000ff;text-align:center;}
        .marked {background-color:red;}
        .marked p {color:white;}
        p.marked {text-decoration:underline;}
        /*div~p{*/
        /*    font-size: 50px;*/
        /*}*/
        /*div+p{*/
        /*    font-size: 50px;*/
        /*}*/
        div>p{
            font-size: 50px;
        }
    </style>
<body>
<h1 class="marked">这是大标题</h1>
<h2>这是2号标题</h2>
<p>这是段落</p>
<p>这是段落</p>
<div class="marked">
    <p>这是div里面的段落p</p>
    <div>
        <p>这是div里面的div里面的的段落p</p>
    </div>
</div>
<p>段落1</p>
<p>段落2</p>
<p>段落3</p>
<p class="marked">这是段落</p>

</body>
</html>